import requst from '@/utils/requst'

export const UserLoginService = ({ username, password }) =>
  requst.post('/login', { username, password })
  

export const UserRegisterService = ({ username, password }) => {
    return requst.post('/register', { username, password })
  }

export const UserLogoutService = () => {
   return requst.get('/logout')
  }

  export const userUpdateAvatarService = (avatar) => {
    return requst.post('/file/upload',{ avatar })
   }

   export const userGetInfoService = () => {
    return requst.put('/user/info')
   }